package com.atguigu.util;

import com.alibaba.druid.pool.DruidPooledConnection;

import java.sql.PreparedStatement;
import java.sql.SQLException;

/**
 * @author yhm
 * @create 2022-11-18 14:05
 */
public class PhoenixUtil {
    public static void executeSql(DruidPooledConnection phoenixConn,String sql){
        // 编译sql
        try {
            PreparedStatement ps = phoenixConn.prepareStatement(sql);
            ps.execute();
            ps.close();
        }catch (SQLException e){
            System.out.println("sql执行错误");
            e.printStackTrace();
        }
    }
}
